# 监控日志文件,找到每分钟大于200次的IP地址,加入到黑名单
import time
point = 0
while True:
    ips={}
    with open('access.log') as f:
    f.seek(point)
    for line in f:
        line = line.strip()
        if line:
            ip = line.split()[0]
            if ip in ips:
                ips[ip]+=1
            else:
                ips[ip]=1
    point f.tell()
    